<%--
  Created by IntelliJ IDEA.
  User: Yzk20
  Date: 2025/6/27
  Time: 11:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../public.jsp"%>
<html>
<head>
    <title>Title</title>
  <link rel="stylesheet" type="text/css" href="css/styless.css">
</head>
<body>
<form action="<%=pageContext.getServletContext().getContextPath()%>/rentServlet">
<%
  String Borrowingid = request.getParameter("Borrowingid");//ID

  String sql = "select * from borrowings t where Borrowingid= '"+Borrowingid+"'";
  Statement stmt=conn.createStatement();
  ResultSet rs=stmt.executeQuery(sql);
  String readername=null;
  String bookid=null;
  String bookname=null;
  String Borrowingtime=null;
  String returntime=null;
  String status=null;
  String phone=null;
  while (rs.next()){
    readername=rs.getString("readername");
    bookid=rs.getString("bookid");
    bookname=rs.getString("bookname");
    Borrowingtime=rs.getString("Borrowingtime");
    returntime=rs.getString("returntime");
    status=rs.getString("status");
    phone=rs.getString("phone");
  }

%>

<table align="center" width="50%" >
  <tr>
    <td><input type="hidden"  name="actionType"  value="rent_update"></td>
    <td><input type="hidden"  name="Borrowingid"  id="Borrowingid" value="<%=Borrowingid%>"></td>
  </tr>
  <tr>
    <td>借阅人：<input type="text" name="readername" id="readername" value="<%=readername%>"></td>
  </tr>
  <tr>
    <td>图书编号：<input type="text" name="bookid" id="bookid" value="<%=bookid%>"></td>
  </tr>
  <tr>
    <td>图书名称
      <input type="text" name="bookname"  id="bookname" value="<%=bookname%>"></td>
  </tr>
  <tr>
    <td>借阅时间
      <input type="date"  name="Borrowingtime" id="Borrowingtime" value="<%=Borrowingtime%>">
    </td>

  </tr>
  <tr>
    <td>预计归还时间
      <input type="date" name="returntime" id="returntime" value="<%=returntime%>">
    </td>

  </tr><tr>
  <td>联系方式
    <input type="text" name="phone" id="phone" value="<%=phone%>">
  </td>

</tr>
  <tr>
    <td colspan="2 " onclick="">
      <input type="submit" value="提交">
    </td>
  </tr>
</table>
</form>
</body>
</html>
